<template>
	<view class="pagee">
		<view class="gradient-component">
			<uni-icons type="scan" size="30" style="margin-left: 270px;"/>
			<uni-icons type="gear-filled" size="30" style="margin-left: 5px;"/>
		</view>
		<!-- 设置 -->
		<view class="User-baseInfo">
			<navigator url="/pages/user/register/Login" open-type="navigate" style="display: inline;">
			<img src="https://ts3.cn.mm.bing.net/th?id=OIP-C.Co0Nxxf5mpR0ssjeQ8mpTQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2" class="user-avatar"></img>
			<view class="user-name" >
				<p style="font-size: 22px;">{{userName}}</p>
				<text v-if="!is_Login" style="font-size: 9px;color: #9d9d9d">{{default_text}}></text>
				<text v-else style="font-size: 9px;color: #ffffff">{{default_text}}</text>
			</view>
			</navigator>
			<uni-row style="height: 50px;margin-top: -12px;" :gutter="0" >
				<uni-col :span="6" :push="2" >
					<view class="up-down">
						<p style="font-size: 25px;font-weight: bolder;">{{myCreate}}</p>
						<text style="font-size: 15px;">我的创作</text>
					</view>
				</uni-col>
				<uni-col :span="6" :push="4" >
					<view class="up-down">
						<p style="font-size: 25px;font-weight: bolder;">{{myLike}}</p>
						<text style="font-size: 15px;">喜欢</text>
					</view>
				</uni-col>
				<uni-col :span="6" :push="5" >
					<view class="up-down">
						<p style="font-size: 25px;font-weight: bolder;">{{mySave}}</p>
						<text style="font-size: 15px;">收藏</text>
					</view>
				</uni-col>
			</uni-row>
		</view>
		<view class="List-card">
			<uni-row style="height: 50px;;margin-top: 20px;" :gutter="0" >
				
				<uni-col :span="6" :push="2" >
					<view class="up-down">
						<image src='../../source/image/book.png' style="width: 30px;height: 30px;"></image>
						<p style="font-size: 15px;">使用手册</p>
					</view>
				</uni-col>
				<uni-col :span="6" :push="4" >
					<view class="up-down">
						<image src='../../source/image/sever.png' style="width: 30px;height: 30px;"></image>
						<p style="font-size: 15px;">更多服务</p>
					</view>
				</uni-col>
				<uni-col :span="6" :push="5" >
					<view class="up-down">
						<image src='../../source/image/shop.png' style="width: 30px;height: 30px;"></image>
						<p style="font-size: 15px;">商城</p>
					</view>
				</uni-col>
			</uni-row>
		</view>
		<view class="List-card" style="height: 70px;text-align: start;line-height: 140rpx;">
			<navigator url="/pages/showAlbum/photoAlbum" open-type="navigate" >
				<uni-icons type="image" size="20" style="margin-left: 20px;">
					<!-- <text style="font-size: 15px;"> 相册</text> -->
					相册
					<text style="margin-left: 210px;">></text>
				</uni-icons>
			</navigator>
		</view>
		<view class="List-card" style="height: 70px;text-align: start;line-height: 140rpx;">
			<uni-icons type="vip" size="20" style="margin-left: 20px;">
				<!-- <text style="font-size: 15px;"> 相册</text> -->
				个人内容管理
				<text style="margin-left: 130px;">></text>
			</uni-icons>
			
		</view>
		<view class="List-card" style="height: 240px;">
			<!-- 客服 -->
			
			<view class="List-items">
				<navigator url="/pages/components/service/service" open-type="navigate" style="display: inline;">
					<uni-icons type="chatbubble" size="20" style="margin-left: 20px;">
						<!-- <text style="font-size: 15px;"> 相册</text> -->
						客服
						<text style="margin-left: 210px;">></text>
					</uni-icons>
				</navigator>
			</view>
			
			<view class="delever"/>
			<!-- 关于 -->
			<view class="List-items">
				<uni-icons type="info" size="20" style="margin-left: 20px;">
					<!-- <text style="font-size: 15px;"> 相册</text> -->
					隐私政策
					<text style="margin-left: 170px;">></text>
				</uni-icons>
			</view>
			<view class="delever"/>
			<view class="List-items">
				<uni-icons type="info" size="20" style="margin-left: 20px;">
					<!-- <text style="font-size: 15px;"> 相册</text> -->
					关于
					<text style="margin-left: 210px;">></text>
				</uni-icons>
			</view>
		</view>
		
	</view>
</template>

<script setup lang="ts">import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import { onLoad,onShow } from "@dcloudio/uni-app"

let avatar = 's';
let userName = ref('未登录');
let default_text = '点击登录/注册'
let myCreate = ref(0);
let mySave = ref(0);
let myLike = ref(0);
const route = useRoute();
let is_Login = ref(false);

onLoad(()=>{
	 uni.$on('templateClick', (card) => {
	    console.log('收到数据', card);
		userName.value = card;
		is_Login.value = !is_Login.value;
	  });
	// if(Option.query.uName)
	// 	userName.value = Option.query.uName
	// console.log("【sh】",route.query)
})


</script>

<style>
	.pagee{
		height: 100%;
		width: 100%;
		background-color: #ffffff;
		padding-bottom: 10px;
	}
	.users_set{
		height: 30px;
		width: 100%;
		margin-top: 1px;
	}
	.gradient-component{
		padding: 20px;
		height: 250px;
		width: 100%;
		background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)),
						url( "https://tse1-mm.cn.bing.net/th/id/OIP-C.B6gwiQo6spaj_OocwbmCdAHaEG?w=280&h=180&c=7&r=0&o=5&pid=1.7");
	}
	.User-baseInfo{
		
		height: 170px;
		width: 90%;
		margin: 20px;
		margin-top: -180px;
		background-color:#ffffff;
		border-radius: 10px;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	}
	.List-card{
		
		height: 90px;
		width: 90%;
		margin: 20px;
		padding-top: 1px;
		background-color:#ffffff;
		border-radius: 10px;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
		
	}
	.user-avatar{
		height: 100px;
		width: 100px;
		border-radius: 50%;
		margin-left: 15px;
		margin-top: -20px;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
	}
	.user-name{
		height: 70px;
		width: 200px;
		
		
		margin: 10px;
		display: inline-block;
	}
	.up-down{
		text-align: center;
	}
	
	.delever{
		height: 1px;
		width: 90%;
		margin: 15px;
		background-color: #bfbfbf;
	}
	.List-items{
		width: 100%;
		display: flex;
		align-items: center;
		height: 50px;
		margin-top: 10px;
	}
</style>
